package com.ithinksflow.auth.security.vo;

/**
 * @Description
 * @ClassName HttpResult
 * @Author MR.LI
 * @date 2020.11.29 22:22
 */
public class HttpResult {

    private int code = 200;
    private String msg;
    private Object data;

    public static HttpResult ok(String msg)
    {
        HttpResult result = new HttpResult();
        result.setMsg(msg);
        return result;
    }

    public static HttpResult ok(Object data)
    {
        HttpResult result = new HttpResult();
        result.setData(data);
        return result;
    }

    public static HttpResult error(int code,String msg)
    {
        HttpResult result = new HttpResult();
        result.setCode(code);
        result.setData(msg);
        return result;
    }
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
